<template>
	<uni-list :border="true" class="warp" v-if="list.length > 0">
		<!-- 自定义右侧内容 -->
		<uni-list-chat v-for="(el,index) in list" :key="index"  :title="el.name" :note="el.pay_time">
			<view class="chat-custom-right">
				<text class="chat-custom-text">{{el.total_fee}}</text>
				<text>{{el.number}}</text>
			</view>
		</uni-list-chat>
	</uni-list>
	<view v-else class="none">
		暂无记录
	</view>
</template>

<script>
	import {
		getPayRecord
	} from '../../module/index.js'
	export default {
		data() {
			return {
				list: []
			}
		},
		onShow() {
			this.getPayRecord()
		},
		methods: {
			getPayRecord() {
				getPayRecord().then((res) => {
					if (res.code === 200) {
						this.list = res.data.data
					} else {
						uni.showToast({
							title: res.message,
							icon: "none"
						})
					}
				}).catch(err => {
					console.log(err)
				})
			}
		}
	}
</script>

<style>
	.chat-custom-right {
		flex: 1;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: column;
		justify-content: space-between;
		align-items: flex-end;
	}

	.chat-custom-text {
		font-size: 12px;
		color: #999;
	}

	.uni-list-chat__header-warp {
		display: none;
	}
	.none{
		margin: auto;
		text-align: center;
		color: #999;
		margin-top: 50rpx;
	}
</style>